set(local_addon_directories "")
set(local_addon_include_directories "")
set(local_addon_link_directories "")

subdirlist(directories ".")
foreach(dir ${directories})
  if (${dir} MATCHES "^cirkit-addon")
    option(enable_${dir} "Enables ${dir}" OFF)
    if(enable_${dir})
      add_subdirectory(${dir})
      set(local_addon_directories "${local_addon_directories};${dir}")
    endif()
  endif()
endforeach()

set(addon_directories ${local_addon_directories} PARENT_SCOPE)
set(addon_include_directories ${local_addon_include_directories} PARENT_SCOPE)
set(addon_link_directories ${local_addon_link_directories} PARENT_SCOPE)
